package com.xiyi.shouxin.conf;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FileUploadConfig {
    private static String BASEFILEPATH = "classpath:/static";
    private static String BASEURL = "/";

    @Value(value = "${upload.file.basePath}")
    private void initBasePath(String BASEFILEPATH) {
        FileUploadConfig.BASEFILEPATH = BASEFILEPATH;
    }

    public static String getBasePath() {
        return FileUploadConfig.BASEFILEPATH;
    }

    @Value(value = "${upload.file.baseUrl}")
    private void initBaseUrl(String BASEURL) {
        FileUploadConfig.BASEURL = BASEURL;
    }

    public static String getBaseUrl() {
        return FileUploadConfig.BASEURL;
    }
}
